package com.heima.feign.clients;

import com.heima.feign.clients.fallback.AdminClientFallbackFactory;
import com.heima.feign.config.HeimaFeignAutoConfiguration;
import com.heima.model.admin.pojos.AdChannel;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "leadnews-admin", fallbackFactory = AdminClientFallbackFactory.class, configuration = HeimaFeignAutoConfiguration.class)
public interface AdminClient {

    @PostMapping("api/v1/sensitive/sensitives")
    public ResponseResult<List<String>> findAllSensitives();

    @PostMapping("api/v1/channel/channel")
    public ResponseResult<AdChannel> findChannelById(@RequestParam Integer channelId);

}
